package com.motion.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.motion.generator.entity.Apply;
import com.motion.generator.mapper.ApplyMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ApplyService {
    @Autowired(required = false)
    ApplyMapper applyMapper;

    //分页查询 ，page是页数，size是页的大小
    public List<Apply> cheak(Long page,Long size){
        //条件构造器
        QueryWrapper queryWrapper=new QueryWrapper();
//        queryWrapper.eq("userId",6);
        List<Apply> ref=applyMapper.selectPage(new Page<>(page,size),queryWrapper).getRecords();
        return ref;
    }

}
